package com.aggron.params;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

/**
 * 用户参数
 * @author liuhuan on 2018/6/3.
 */
@Data
public class UserParams {

    private Integer id;

    @NotNull(message = "用户名不能为空")
    @Length(min=1,max=20 ,message = "用户名长度在1-20之间")
    private String username;

    @NotNull(message = "电话不能为空")
    @Length(max=13,message = "用户名长度在13之内")
    private String telephone;

    @NotNull(message = "邮箱不能为空")
    @Length(max=50, min=5 ,message = "用户名长度在50之内")
    private String mail;

    @NotNull(message = "部门名称不能为空")
    private Integer deptId;

    @NotNull(message = "用户状态不能为空")
    @Min(value = 0,message = "用户状态不合法" )
    @Max(value = 2,message = "用户状态不合法" )
    private Integer status;

    @Length(min=0,max = 200,message = "用户状态在200字以内")
    private String remark;


}
